<?php
include '../../operations/connection.php';
$a= (string)(microtime(true)*1000);
$b=split('\.',$a);
$idcomment= $b[0];

$id_testproject = $_REQUEST['idtestproject'];
$newlang = $_REQUEST['newlang'];
		
		if ($_REQUEST['newlang'] == "EN") {
			include "../../value/value_en.php";
		}else if($_REQUEST['newlang'] == "VN") {
			include "../../value/value_vn.php";
		}
		else {
			include "../../value/value_kr.php";
		}
		
$sqlupdate = "UPDATE pr_testproject SET `Status` = -1 ,DateConfirm ='0000-00-00 00:00:00',`IdPriorityColor`=`IdPriorityColorTemp` WHERE IDTest = '$id_testproject'";
mysql_query($sqlupdate);

$labelreopen = $l_reopen."-%$#@!-#424242";

$id_employee = $_REQUEST['idemp'];

//$commentvalue= str_replace('\\r\\n','<br>',$comment."-%$#@!-#".$stylecolor);
$sqladdcomment = "insert into pr_comment(IDComment,IDTestProject,IDEmployee,`Comment`,DateComment)
 VALUES('$idcomment','$id_testproject','$id_employee','$labelreopen',NOW())";
mysql_query($sqladdcomment);
$username = $_SESSION['fullname'];
$id_employee = $_SESSION['IDEmployee'];
if($username!=""){
	$sqlinserttestpro = "UPDATE pr_testproject SET Comment_Last = '$labelreopen', NameEmployee_Last = '$username',DateConfirm = '0000-00-00 00:00:00',`IdPriorityColor`=`IdPriorityColorTemp`
							WHERE IDTest = '$id_testproject' ";
	mysql_query($sqlinserttestpro);
}

$page = isset ( $_REQUEST["page"] ) ? intval ( $_REQUEST["page"] ) : 1;


include 'inlude_listerror.php';
echo 'aa';

mysql_close($connection);?>